package org.chen.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("video_task")
public class VideoTask {
    @TableId(type = IdType.ASSIGN_ID)
    private String id;
    
    /**
     * 关联的文章ID
     */
    private String articleId;
    
    /**
     * HeyGen返回的视频ID
     */
    private String videoId;
    
    /**
     * 回调标识
     */
    private String callbackId;

    /**
     * 关联配置ID
     */
    private String configId;

    /**
     * 关联apikey
     */
    private String apiKey;
    
    /**
     * 视频标题
     */
    private String title;
    
    /**
     * 视频描述（用于生成）
     */
    private String description;
    
    /**
     * 虚拟人物ID
     */
    private String avatarId;
    
    /**
     * 语音ID
     */
    private String voiceId;

    /**
     * 视频背景关联id
     */
    private String backgroundId;

    /**
     * 视频URL
     */
    private String videoUrl;

    /**
     * Gif URL
     */
    private String gifUrl ;
    
    /**
     * 任务状态（0:待生成 1:生成中 2:生成完成 3:生成失败）
     */
    private Integer status;
    private Integer width;
    private Integer height;

    private Boolean caption;

    private String category ;

    private String categoryId;    // 分类ID

    private String categoryPath;  // 分类路径

    /**
     * 错误信息
     */
    private String errorMessage;
    
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableField("retry_count")
    private Integer retryCount;

    @TableField("is_multi_avatar")
    private Boolean isMultiAvatar = false;

    @TableField("task_group_id")
    private String taskGroupId;

    @TableField("avatar_index")
    private Integer avatarIndex;
}